<template>
  <div @click="addClick">我是子组件----{{ a }}----{{ b }}</div>
</template>

<script>
export default {
  props: {
    a: {
      type: Number,
      required: true
    },
    b: {
      type: Number,
      required: true
    }
  },
  data () {
    return {

    }
  },
  methods: {
    addClick () {
      this.$emit('update:a', this.a + 1)
      this.$emit('update:b', this.b + 1)
    }
  }
}
</script>

<style>
</style>